From: Carlos Garnacho Date: Fri, 29 Oct 2021 14:41:55 +0000 (+0200) Subject: inputMethod: Equate empty preedit string to null X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~557^2^2~20 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b1538fcb2079b836ac5f8170a0949f77bb5f35e4;p=gnome-shell.git inputMethod: Equate empty preedit string to null If we get '' from the IM as the preedit string, it is pretty safe to handle it as "no preedit" altogether. (Cherry-picked from commit 286cfdc6d48dc4315df54d29d7d16b5198d92a56) --- diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js index 1f9eaee7a..7de7540d3 100644 --- a/js/misc/inputMethod.js +++ b/js/misc/inputMethod.js @@ -111,6 +111,8 @@ class InputMethod extends Clutter.InputMethod { return; let preedit = text.get_text(); + if (preedit === '') + preedit = null; if (visible) this.set_preedit_text(preedit, pos, mode);